package org.example.enums;

public enum AppHttpCodeEnum {

    SUCCESS(200,"操作成功"),
    // 登录
    NEED_LOGIN(401,"需要登录后操作"),
    NO_OPERATOR_AUTH(403,"无权限操作"),
    SYSTEM_ERROR(500,"出现错误"),
    USERNAME_EXIST(501,"用户名已存在"),
    PHONENUMBER_EXIST(502,"手机号已存在"),
    EMAIL_EXIST(503, "邮箱已存在"),
    REQUIRE_USERNAME(504, "必需填写用户名"),
    UPDATE_ERROR(506,"更新失败"),
    LOGIN_ERROR(505,"用户名或密码错误"),
    USERNAME_NOT_ERROR(507,"用户名不能为空·"),
    NICKNAME_NOT_ERROR(508,"昵称不能为空"),
    EMAIL_NOT_ERROR(509,"邮箱不能为空"),
    PASSWORD_NOT_ERROR(510,"密码不能为空"),
    NICKNAME_EXIST(511,"昵称已存在"),
    CONFIRM_PASSWORD_NOT_ERROR(512,"确认密码不能为空"),
    DIFFERENT_ERROR(513,"两次密码不一样"),

    PAGE_SIZE_ERROR(514,"pageSize数据有问题"),

    PAGE_NUM_ERROR(515,"pageNum数据有问题"),

    NOT_CONTENT_ERROR(303,"数据为空"),

    NOT_ROLE_KEY_ERROR(520,"权限字符不能为空"),

    NOT_ROLE_NAME_ERROR(521,"角色名不能为空"),

    ROLE_EXIST(522,"角色已存在"),

    MENU_PARENT_ERROR(524,"父级菜单不能是自己"),

    NOT_CITY_NAME_ERROR(525,"城市名不能为空"),

    CITY_NAME_EXITS(526,"城市名已存在"),

    NOT_SPOT_NAME_ERROR(534,"景区名不能为空"),

    MENU_PATH_EXIST(528,"菜单路径已存在"),

    CATEGORY_NAME_EXIST(529,"分类名已存在"),

    NOT_CATEGORY_NAME_ERROR(530,"分类名不能为空"),

    NOT_ARTICLE_TITLE_ERROR(531,"文章标题不能为空"),

    NOT_GALLERY_URL_ERROR(532,"图片地址不能为空"),

    NOT_MESSAGE_CONTENT_ERROR(534,"留言内容不能为空"),

    NOT_COMMENT_CONTENT_ERROR(535,"评论内容不能为空");

    int code;
    String msg;

    AppHttpCodeEnum(int code, String errorMessage){
        this.code = code;
        this.msg = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
